#define _CRT_SECURE_NO_WARNINGS 1
#pragma warning(disable:6031)

#include "Stack.h"

static void Test1(void)
{
	Stack ST;
	StackInit(&ST);
	StackPush(&ST, 1);
	StackPush(&ST, 2);
	StackPush(&ST, 3);
	StackPop(&ST);
	StackPop(&ST);
	StackPush(&ST, 4);
	StackPush(&ST, 5);
	StackPop(&ST);
	StackPush(&ST, 6);
	StackPop(&ST);
	StackPop(&ST);
	StackPop(&ST);
	StackPop(&ST);
	StackDestroy(&ST);
}

static void Test2(void)
{
	Stack ST;
	StackInit(&ST);
	StackPush(&ST, 1);
	StackPush(&ST, 2);
	StackPush(&ST, 3);
	StackPush(&ST, 4);
	StackPush(&ST, 5);
	while (!StackEmpty(&ST))
	{
		printf("%d ", StackTop(&ST));
		StackPop(&ST);
	}
	StackDestroy(&ST);
}

int main()
{
	//Test1();
	Test2();
	return 0;
}